package com.woniuxy.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.controller.info.Result;
import com.woniuxy.model.Rule;
import com.woniuxy.service.RuleService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Kevin Martin
 * @since 2022-03-15
 */
@RestController
@RequestMapping("/rule")
public class RuleController {


    @Resource
    private RuleService ruleService;
    @PostMapping("getAllRole")
    public Result getAllRole(){
        List<Rule> list = ruleService.list();
        return Result.getInstanceList(Rule.class).setData(list);
    }

}

